package com.orhonit.ipb.portal.biz;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.orhonit.ipb.portal.entity.JoJoinInfo;
import com.orhonit.ipb.portal.mapper.JoJoinInfoMapper;
import com.orhonit.ipb.security.common.biz.BusinessBiz;


/**
 * 入党基本信息表
 *
 * @author 
 * @email 
 * @version 2018-05-22 08:50:05
 */
@Service
public class JoJoinInfoBiz extends BusinessBiz<JoJoinInfoMapper,JoJoinInfo> {
	@Autowired
	private JoJoinInfoMapper joinInfoMapper;
	/**
	 * 通过申请id及label查询信息
	 * @return
	 */
	public JoJoinInfo getJoJoinInfoByMap(Map<String, Object> map){
		return joinInfoMapper.getJoJoinInfoByMap(map);
	}
	/**
	 * 通过申请id及label更新信息信息
	 * @param joinInfo
	 * @return
	 */
	@Transactional(rollbackFor = Exception.class)
	public boolean updateJoJoinInfoByMap(JoJoinInfo joinInfo){
		boolean a=false;
		int count=joinInfoMapper.updateJoJoinInfoByMap(joinInfo);
		if(count>0){
			a=true;
		}
		return a;
	}
	/**
	 * 通过joinid 和label 删除信息  joinId  label
	 * @param map
	 * @return
	 */
	@Transactional(rollbackFor = Exception.class)
	public boolean  deleteJoJoinInfoByMap(Map<String, Object> map){
		boolean a=false;
		int count=joinInfoMapper.deleteJoJoinInfoByMap(map);
		if(count>0){
			a=true;
		}
		return a;
	}
	
	
}